import request from '@/config/axios'

/*****************************模板管理****************************** */

// 查询 分页
export const getpictureTemplatePage = (params) => {
  return request.get({ url: '/pictureTemplate/list', params })
}

// 删除
export const deletepictureTemplate = (data) => {
  return request.post({ url: '/pictureTemplate/delete',data })
}

// 新增/修改
export const savepictureTemplate = (data) => {
  return request.post({ url: '/pictureTemplate/saveOrUpdate',data })
}
// 更新状态
export const updatepictureTemplateValid = (params) => {
  return request.get({ url: '/pictureTemplate/updateStatus',params })
}

// 详情
export const getByIdpictureTemplate = (params) => {
  return request.get({ url: '/pictureTemplate/getById',params })
}

/*****************************规则管理****************************** */

// 查询 分页
export const getpictureRulePage = (params: PageParam) => {
  return request.get({ url: '/pictureRule/list', params })
}

// 删除
export const deletepictureRule = (data) => {
  return request.post({ url: '/pictureRule/delete',data })
}

// 新增/修改
export const savepictureRule = (data) => {
  return request.post({ url: '/pictureRule/saveOrUpdate',data })
}
// 更新状态
export const updatepictureRuleValid = (data) => {
  return request.post({ url: '/pictureRule/isValid',data })
}

// 详情
export const getByIdpictureRule = (params) => {
  return request.get({ url: '/pictureRule/getById',params })
}

// 测试
export const pictureRuleTest = (data) => {
  return request.post({ url: '/pictureRule/test',data })
}

// 所有模版数T
export const pictureTemplateTwoList = () => {
  return request.get({ url: '/pictureTemplate/twoList' })
}